﻿@using ThuySan.Areas.Backend.Models
@model ThuySan.Models.EmailTemplateModel
@{
    Layout = "~/Areas/Backend/Views/Shared/_Layout.cshtml";
    Header header = new Header {
                                       Common = "ViewUserControl_Email_Edit",
                                       PageHeader = "Edit Email Template",
                                       Menulv1 = "02",
                                       Menulv2 = "0202"
                               };
    ViewData[Header.Key] = header;
    ViewBag.Title = "Edit Email Template - Admin Control Panel";
}
<div class="content-box">
    <div class="content-box-header">
        <h3>
            Edit Email Template</h3>
    </div>
    <div class="content-box-content">
        @using (Html.BeginForm("Edit", "Email", FormMethod.Post, new {
                                                                             enctype = "multipart/form-data"
                                                                     }))
        {
            <div class="input-item">
                <label>
                    Subject</label>
                @Html.TextBoxFor(c => c.Subject, new {
                                                             @class = "text-input medium-input"
                                                     })
                @Html.ValidationMessageFor(c => c.Subject)
            </div>
            <div class="input-item">
                <label>
                    Body</label>
                @{
                    Html.Telerik().Editor().Name("Body").Encode(false).HtmlAttributes(new {
                                                                                                  style = "height:400px"
                                                                                          }).FileBrowser(t => t.Browse("Browse", "ImageBrowser").Thumbnail("Thumbnail", "ImageBrowser").Upload("Upload", "ImageBrowser").DeleteFile("DeleteFile", "ImageBrowser").DeleteDirectory("DeleteDirectory", "ImageBrowser").CreateDirectory("CreateDirectory", "ImageBrowser")).Value(Model.Body).Render();
                }
            </div>
            <input type="submit" value="Update" class="button" />
            <input type="button" onclick=" javascript:window.location.href = '@Url.Action("Index")'; " value="Reset" class="button" />
        }
    </div>
</div>